build: do not hardcode paths outside of $prefix#16998
build: do not hardcode paths outside of $prefix#16998intelfx wants to merge 3 commits intoopenzfs:masterfrom
Conversation
|
@intelfx Linux builders are quite unhappy. |
Yes, I'll fix this. I'm just putting this out here as a PR to run CI on it because it's easier than setting up all those distros locally. |
OK. If it take longer, you could run CI in your own clone or mark the PR as draft. |
|
@intelfx - In case you're not aware, you can see the same tests running for each of your pushes in the GitHub Actions for your repository: https://github.com/intelfx/zfs/actions. |
Yes, I was not aware. I assumed that typically CI runs (especially heavyweight ones) are limited to the parent repository to avoid abuse, so this is unexpected. |
As I understand you would only abuse your own limits, unrelated to OpenZFS. You can control whether to run CI on pushes to your own clone in its settings. By default I think it is enabled. |
|
@intelfx superficial review looks great. Another thing I've wanted/hacked up/been getting around to for ages. I'll be happy to give it a more in-depth review once you're done! |
406fa95 to
a53814c
Compare
This fixes behavior of the build system when a prefix other than `/usr` is provided. Specifically, this change makes it possible to build ZFS utils with `--prefix=` set to a user-writable directory (such as `$HOME/...`) and successfully run `make install` without superuser privileges. Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
a53814c to
da75e1e
Compare
2ac5200 to
63b0356
Compare
Motivation and Context
When making local builds of ZFS for debugging, it might be convenient to be able
to make several different builds of ZFS utils and install/run them side-by-side.
When doing so in process of debugging an unrelated change, I discovered that
even if configure is ran with
--prefix=pointing to a user-writable directory,make installalways attempts to write some files to system-wide locations(and thus fails without superuser privileges, not to mention the fact that you
generally do not want to overwrite system files with a dev build regardless).
Description
This fixes behavior of the build system when a prefix other than
/usris provided.
Specifically, this change makes it possible to build ZFS utils with
--prefix=set to a user-writable directory (such as$HOME/...)and successfully run
make installwithout superuser privileges.How Has This Been Tested?
prefix=/usrandprefix!=/usr(NOTE: CI failures seem relevant, something seems to go wrong with other distros, I'll fix the problems but still would like a superficial review to confirm this is acceptable/reasonable)
Types of changes
Checklist:
Signed-off-by.